﻿<UserControl 
    x:Class="Microsoft.Forums.ForumsClient.Views.MainWindowView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ForumsClient="clr-namespace:Microsoft.Forums.ForumsClient"
    xmlns:Views="clr-namespace:Microsoft.Forums.ForumsClient.Views"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    >
    <Grid Background="{DynamicResource DefaultWindowBackground}">

        <DockPanel x:Uid="DockContainer" x:Name="DockContainer" 
                   HorizontalAlignment="Stretch"  
                   VerticalAlignment="Stretch" Width="Auto" 
                   Height="Auto" LastChildFill="True">

            <Grid x:Uid="Header" x:Name="Header" Opacity="1" DockPanel.Dock="Top">

                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" x:Uid="AppTitle" x:Name="AppTitle"  VerticalAlignment="Top" Orientation="Horizontal">
                    <TextBlock x:Uid="TextBlock_1" Opacity="0.5" FontFamily="Segoe" FontSize="28" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource DefaultTextForeground}" Text="Microsoft" Height="30.52"/>
                    <TextBlock x:Uid="TextBlock_2" Opacity="1"  Margin="10 0 0 0" FontFamily="Segoe" FontSize="28" FontStretch="Normal" TextWrapping="Wrap" Foreground="{DynamicResource DefaultTextForeground}" Text="Forums Client" Height="30.52"/>
                </StackPanel>

                <Views:ToolBarTrayView Grid.Row="1" />

            </Grid>


            <Views:StatusBarView DockPanel.Dock="Bottom" />

            <Grid x:Uid="MainGrid" x:Name="MainGrid">
                <Grid.RowDefinitions>
                    <RowDefinition x:Uid="RowDefinition_1" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition x:Uid="ColumnDefinition_1" Width="0.3*" />
                    <ColumnDefinition x:Uid="ColumnDefinition_2" Width="Auto" />
                    <ColumnDefinition x:Uid="ColumnDefinition_3" />
                </Grid.ColumnDefinitions>


                <!--Add the left pane to Row 0 (to the above MainGrid Row) Column 0 -->
                <Grid Grid.Row="0" Grid.Column="0">
                    <Grid.RowDefinitions>
                        <!--The height constraint is what makes the treeview vertical scrollbar visible -->
                        <RowDefinition Height="0.5*"/>
                    </Grid.RowDefinitions>
                    <Border Grid.Row="0" BorderBrush="{DynamicResource DefaultBorder}" BorderThickness="0.5" Margin="1 5 1 1">
                        <Views:ForumFolderView  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                    </Border>
                </Grid>


                <!--Add Vertical Split to Column 1 -->
                <GridSplitter x:Uid="VerticalSplitter" x:Name="VerticalSplitter" Grid.Column="1"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Stretch"
                        Background="Transparent"
                        Height="Auto"
                        Margin="0,0,0,0"
                        ShowsPreview="True"
                        Width="3"
                        />

                <!--Add a Grid to column 2 of the parent Grid. Split the 3rd column into 3 rows. Top row has the threads pane. 2nd row contains the splitter. 3rd row 
                 contains the post pane-->
                <Border 
                            BorderBrush="{DynamicResource DefaultBorder}" 
                            Grid.Row="0" Grid.Column="2" 
                            BorderThickness="0.5" 
                            Margin="1 5 1 1">
                    <DockPanel>

                        <Views:ForumFilterView VerticalAlignment="Stretch" HorizontalAlignment="Stretch" ContainedView="{DynamicResource ThreadedView}" />

                    </DockPanel>
                </Border>

            </Grid>
            <!-- End of MainGrid-->

        </DockPanel>
    </Grid>
</UserControl>
